package response

import "github.com/gin-gonic/gin"

type RespnseValue struct {
	Result  string      `json:"result"`
	Message string      `json:"message"`
	Payload interface{} `json:"payload"`
}

func Success(ctx *gin.Context, message string, payload interface{}) {
	responseValue := RespnseValue{"success", message, payload}
	ctx.JSON(200, responseValue)
}

func Fail(ctx *gin.Context, message string, payload interface{}) {
	responseValue := RespnseValue{"fail", message, payload}
	ctx.JSON(200, responseValue)
}
